package 第四章作业.O407;

import java.util.Scanner;

public class Test3 {
    public static void main(String[] args){
        Point();
    }

    public static void Point(){
        int[] point = new int[6];
        Scanner reader = new Scanner(System.in);
        for(int i = 0;i < 6;i++){
            System.out.println("第"+(i+1)+"个评委评分为：");
            point[i] = reader.nextInt();
        }
        for(int i = 5;i >= 0;i--){
            for(int j = 0; j < i;j++){
                if(point[j] > point[j+1]){
                    int a = point[j];
                    point[j] = point[j+1];
                    point[j+1] = a;
                }
            }
        }
        int b = 0;
        for(int i = 1;i < 5;i++){
            b += point[i];
        }
        System.out.println("选手最终得分为"+Math.floor(b/4));
    }
}
